package atlantik.ui;

import modelz.Updateable;
import atlantik.game.Atlantik;
import atlantik.game.action.BoundAction;
import atlantik.game.action.BoundActionFactory;

public class PeerSupport<T extends Updateable<T>> {
	
	private final Atlantik client;
	private final T item;

	public PeerSupport(Atlantik client, T item) {
		this.client = client;
		this.item = item;
	}

	protected <B extends BoundActionFactory<A,T>, A extends BoundAction<A,T>> ClientAction<A> getAction(
			B factory) {
		return new ClientAction<A>(factory.getActionInstance(
				client, item));
	}

}
